// tip-dialog
const { BaseBehavior, COMPONENT_OPTIONS } = require('../../mixins/component');
const { TIP_RECHARGE } = require('../../constants/tip');

const _baseInfo = {
    haveCancel: false,
    cancelText: '取消',
    okText: '确定',
    image: TIP_RECHARGE,
    iconName: 'checkfill',
    iconColor: '#07C160',
    title: '操作成功',
    desc: '你的操作已经完成了',
};

Component({
    behaviors: [BaseBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        show: {
            type: Boolean,
            value: false,
        },
        tipInfo: {
            type: Object,
            value: _baseInfo,
        },
    },
    data: {

    },
    methods: {
        cancelAction() {
            this.triggerEvent('cancel');
        },
        okAction() {
            this.triggerEvent('ok');
        },
    }
})
